package duoTai;

public class Master {
public void eat(FatherPet fp){
	if(fp instanceof Dog){
		((Dog)fp).feed();
		((Dog)fp).watch();
	}else if(fp instanceof Cat){
		((Cat)fp).catchMonth();
		((Cat)fp).feed();
	}
}
}
